home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #1 / Amiga Plus CD - 2000 - No. 1.iso / Tools / Dev / mamesrc / include / cgxhooks.h next >
C/C++ Source or Header  |  1999-12-03  |  4KB  |  119 lines

  1. #ifndef CGXHOOKS_H
  2. #define CGXHOOKS_H
  3.  
  4. #define    CGXHOOK_WRITECLUT8        0
  5. #define    CGXHOOK_COLORIMPOSE        1
  6. #define    CGXHOOK_BITMAPIMPOSE    2
  7.  
  8. struct CGXHookMsg
  9. {
  10.     struct Layer    *Layer;
  11.     struct Rectangle Bounds;
  12.     LONG             OffsetX;
  13.     LONG             OffsetY;
  14. };
  15.  
  16. struct CGXHook
  17. {
  18.     struct Hook            Hook;
  19.     ULONG                Type;
  20.     struct Library        *SysBase;
  21.     struct Library        *GfxBase;
  22.     struct Library        *LayersBase;
  23.     struct Library        *CyberGfxBase;
  24.     ULONG                BytesPerPixel;
  25.     ULONG                PixFmt;
  26.     struct Screen        *Screen;
  27.     UBYTE                *Source;
  28.     ULONG                Data;
  29.     ULONG                SrcMod;
  30.     ULONG                SrcX;
  31.     ULONG                SrcY;
  32.     ULONG                DstX;
  33.     ULONG                DstY;
  34.     ULONG                Remap[256];
  35. };
  36.  
  37. #ifdef __GNUC__
  38. #include <macros.h>
  39.  
  40. void __saveds FreeCGXHook(struct CGXHook *hook __asm("a0"));
  41.  
  42. struct CGXHook * __saveds AllocCLUT8RemapHook(struct Screen *scr __asm("a0"),
  43.                                               ULONG *palette __asm("a1"));
  44.  
  45. void __saveds DoCLUT8RemapHook(struct CGXHook *hook __asm("a0"),
  46.                                UBYTE *chunky __asm("a1"), struct RastPort *rp __asm("a2"),
  47.                                LONG srcx __asm("d0"), LONG srcy __asm("d1"),
  48.                                LONG dstx __asm("d2"), LONG dsty __asm("d3"),
  49.                                LONG width __asm("d4"), LONG height __asm("d5"),
  50.                                LONG srcmod __asm("d6"));
  51.  
  52. void __saveds PaletteCLUT8RemapHook(struct CGXHook *hook __asm("a0"),
  53.                                     ULONG *palette __asm("a1"));
  54.  
  55. void __saveds CustomRemapCLUT8RemapHook(struct CGXHook *hook __asm("a0"),
  56.                                         ULONG *remaptable __asm("a1"));
  57.  
  58. struct CGXHook * __saveds AllocColorImposeHook(struct RastPort *rp __asm("a0"));
  59.  
  60. void __saveds DoColorImposeHook(struct CGXHook *hook __asm("a0"),
  61.                                 struct RastPort *rp __asm("a1"),
  62.                                 LONG minx __asm("d0"), LONG miny __asm("d1"),
  63.                                 LONG maxx __asm("d2"), LONG maxy __asm("d3"),
  64.                                 ULONG color __asm("d4"));
  65.  
  66. struct CGXHook * __saveds AllocBitMapImposeHook(struct RastPort *rp __asm("a0"));
  67.  
  68. void __saveds DoBitMapImposeHook(struct CGXHook *hook __asm("a0"),
  69.                                  struct BitMap *src1 __asm("a1"),
  70.                                  struct BitMap *src2 __asm("a2"),
  71.                                  struct RastPort *rp __asm("a3"),
  72.                                  ULONG src1x __asm("d0"), ULONG src1y __asm("d1"),
  73.                                  ULONG src2x __asm("d2"), ULONG src2y __asm("d3"),
  74.                                  LONG dstx __asm("d4"), LONG dsty __asm("d5"),
  75.                                  ULONG width __asm("d6"), ULONG height __asm("d7"));
  76.  
  77. #else
  78.  
  79. void __saveds __asm FreeCGXHook(register __a0 struct CGXHook *hook);
  80.  
  81. struct CGXHook * __saveds __asm AllocCLUT8RemapHook(register __a0 struct Screen *scr,
  82.                                                     register __a1 ULONG *palette);
  83.  
  84. void __saveds __asm DoCLUT8RemapHook(register __a0 struct CGXHook *hook,
  85.                                     register __a1 UBYTE *chunky, register __a2 struct RastPort *rp,
  86.                                     register __d0 LONG srcx, register __d1 LONG srcy,
  87.                                     register __d2 LONG dstx, register __d3 LONG dsty,
  88.                                     register __d4 LONG width, register __d5 LONG height,
  89.                                     register __d6 LONG srcmod );
  90.  
  91. void __saveds __asm PaletteCLUT8RemapHook(    register __a0 struct CGXHook *hook,
  92.                                             register __a1 ULONG *palette);
  93.  
  94. void __saveds __asm CustomRemapCLUT8RemapHook(    register __a0 struct CGXHook *hook,
  95.                                             register __a1 ULONG *remaptable);
  96.  
  97. struct CGXHook * __saveds __asm AllocColorImposeHook(register __a0 struct RastPort *rp);
  98.  
  99. void __saveds __asm DoColorImposeHook(register __a0 struct CGXHook *hook,
  100.                                     register __a1 struct RastPort *rp,
  101.                                     register __d0 LONG minx, register __d1 LONG miny,
  102.                                     register __d2 LONG maxx, register __d3 LONG maxy,
  103.                                     register __d4 ULONG color);
  104.  
  105. struct CGXHook * __saveds __asm AllocBitMapImposeHook(register __a0 struct RastPort *rp);
  106.  
  107. void __saveds __asm DoBitMapImposeHook(register __a0 struct CGXHook *hook,
  108.                                     register __a1 struct BitMap *src1,
  109.                                     register __a2 struct BitMap *src2,
  110.                                     register __a3 struct RastPort *rp,
  111.                                     register __d0 ULONG src1x, register __d1 ULONG src1y,
  112.                                     register __d2 ULONG src2x, register __d3 ULONG src2y,
  113.                                     register __d4 LONG dstx, register __d5 LONG dsty,
  114.                                     register __d6 ULONG width, register __d7 ULONG height);
  115.  
  116. #endif
  117.  
  118. #endif
  119.